package org.chen.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("sys_category")
public class Category {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    private String name;
    
    private String code;  // 分类编码，用于业务识别
    
    private String parentId;
    
    private Integer level;
    
    private String path;  // 存储完整路径
    
    private Integer sort;
    
    private String icon;
    
    private String description;
    
    private Integer status;  // 0-禁用 1-启用
    
    private String type;  // 分类类型，用于区分不同业务场景
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @Version
    private Integer version;
}